﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace yz_passport
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            Response.Cookies.Add(this.getCompanyNameCookie());
            Response.Cookies.Add(this.getRpcURL());

        }

        private HttpCookie getCompanyNameCookie()
        {
            HttpCookie cookie = new HttpCookie("ext-companyName");
            String companyName = "上海因致信息科技有限公司";
            Encoding encoding = Encoding.GetEncoding("utf-8");
            cookie.Value = "s%3A"+ HttpUtility.UrlDecode(companyName, encoding);
            return cookie;
        }

        private HttpCookie getRpcURL()
        {
            HttpCookie cookie = new HttpCookie("ext-RpcURL");
            cookie.Value = "s%3Ahttp://localhost/RpcService/";
            cookie.Expires = DateTime.Now.AddDays(1);
            return cookie;
        }
    }
}